Skip to content

Conversation

@dhruvCW
Copy link

@dhruvCW dhruvCW commented Jun 22, 2024

Grape 2.1.0 Introduced the length validator . We can now use the length validator to specify the min/maxItems (for array types) and min/maxLength (for String types) for the attributes that use the validator in the generated swagger document.

Fixed test that was broken with rack 3 and restricted rack < 3 for grape < 2

@dhruvCW
Copy link
Author

dhruvCW commented Jun 22, 2024

Test failures seem unrelated to this PR 🤔 fixed the broken tests.

There grape < 2.0 seems to require rack < 3.0 and there was a test that didn't set it's body that was breaking with rack 3.

Copy link
Member

@LeFnord LeFnord left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @dhruvCW … yeah it makes sense

@LeFnord LeFnord merged commit a5e2575 into ruby-grape:master Jun 28, 2024
@dhruvCW dhruvCW deleted the min_max_length branch June 28, 2024 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants